﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPageAdmin.master" AutoEventWireup="true" CodeFile="Ticket.aspx.cs" Inherits="Admin_Ticket" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <table style="width:100%;">
            <tr>
                <td class="style1" colspan="2" 
                        style="border-bottom-style: outset; border-bottom-width: 1px; height: 48px;">
                    <asp:Label ID="lblTitle2" runat="server" Font-Size="16pt" ForeColor="#0099FF" 
                            Text="Add Ticket"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                        &nbsp;</td>
                <td>
                        &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblTicketId" runat="server" Text="TicketId:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtTicketId" runat="server" Enabled="False" Width="236px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px; height: 27px;">
                    <asp:Label ID="lblMovieID" runat="server" Text="Movie Name:"></asp:Label>
                </td>
                <td style="height: 27px">
                    <asp:DropDownList ID="ddlMovieID" runat="server" Height="20px" Width="242px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px; height: 27px;">
                    <asp:Label ID="lblChairID" runat="server" Text="ChairID:"></asp:Label>
                </td>
                <td style="height: 27px">
                    <asp:DropDownList ID="ddlChairID" runat="server" Height="22px" Width="241px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                        <asp:Label ID="lblPrice" runat="server" Text="Price:"></asp:Label>
                </td>
                <td>
                        <asp:TextBox ID="txtPrice" runat="server" Height="22px" Width="236px" 
                            TextMode="Number"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblDateMovie" runat="server" Text="DateMovie:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDateMovie" runat="server" Height="22px" TextMode="Date" 
                        Width="236px"></asp:TextBox>
                    <asp:CalendarExtender ID="txtDateMovie_CalendarExtender" runat="server" 
                        ClearTime="True" Format="yyyy-MM-dd" PopupButtonID="imgbtnDateMovie" 
                        TargetControlID="txtDateMovie">
                    </asp:CalendarExtender>
                    <asp:ImageButton ID="imgbtnDateMovie" runat="server" 
                        ImageUrl="~/images/Image/Calendar_scheduleHS.png" />
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblTimeMovie" runat="server" Text="TimeMovie:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtTimeMovie" runat="server" Height="22px" TextMode="Time" 
                        Width="235px">00:00</asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblStatusC" runat="server" Text="Status:"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server" Height="22px" Width="240px">
                        <asp:ListItem Value="0">No sale</asp:ListItem>
                        <asp:ListItem Value="1">Sold</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblNotes" runat="server" Text="Notes:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtNotes" runat="server" Height="63px" TextMode="MultiLine" 
                        Width="237px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                    <asp:Label ID="lblError" runat="server" ForeColor="#FF3300" Text="Label" 
                            Visible="False"></asp:Label>
                </td>
                <td>
                        &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" style="width: 132px">
                        &nbsp;</td>
                <td>
                    <asp:Button ID="btnSummit" runat="server" BorderStyle="Inset" BorderWidth="1px" 
                            onclick="btnSummit_Click" Text="Summit" />
                </td>
            </tr>
        </table>
        <br />
        <table style="width: 100%; height: 242px;">
            <tr>
                <td style="height: 46px; border-bottom-style: outset; border-bottom-width: 1px;">
                    <asp:Label ID="lblTicket" runat="server" Font-Bold="True" Font-Size="12pt" 
                            ForeColor="#99CCFF" Text="Ticket list"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="height: 32px">
                    <asp:Label ID="lblSearchC" runat="server" Text="Movie Name:"></asp:Label>
                    <asp:DropDownList ID="ddlSearch" runat="server" style="margin-left: 53px" 
                        Width="272px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="height: 32px">
                    <asp:Label ID="lblSearch0" runat="server" Text="Search Date:"></asp:Label>
                    <asp:TextBox ID="txtSearch" runat="server" Height="21px" 
                        style="margin-left: 54px" Width="265px"></asp:TextBox>
                    <asp:CalendarExtender ID="txtSearch_CalendarExtender" runat="server" 
                        Format="yyyy-MM-dd" PopupButtonID="imgbtnDateS" TargetControlID="txtSearch">
                    </asp:CalendarExtender>
                    <asp:ImageButton ID="imgbtnDateS" runat="server" 
                        ImageUrl="~/images/Image/Calendar_scheduleHS.png" />
                </td>
            </tr>
            <tr>
                <td style="height: 32px">
                    <asp:Label ID="lblTimeMovieS" runat="server" Text="Time Movie:"></asp:Label>
                    <asp:TextBox ID="txtTimeMovieS" runat="server" Height="22px" 
                        style="margin-left: 59px" TextMode="Time" Width="263px"></asp:TextBox>
                    <asp:Button ID="btnSearch0" runat="server" BorderStyle="Inset" 
                        BorderWidth="1px" onclick="btnSearch0_Click" style="margin-left: 98px" 
                        Text="Search" />
                </td>
            </tr>
            <tr>
                <td style="height: 24px">
                    <asp:Label ID="lblError1" runat="server" ForeColor="Red" Text="Label" 
                            Visible="False"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="height: 15px">
                    <asp:GridView ID="grvData" runat="server" AllowPaging="True" 
                            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="TicketId" 
                            onrowcancelingedit="grvDataCancel" onrowediting="grvDataEdit" 
                            onrowupdating="grvDataUpload" Width="99%" 
                        onpageindexchanging="grvIndex">
                        <Columns>
                            <asp:TemplateField HeaderText="TicketId">
                                <ItemTemplate>
                                    <asp:Label ID="lblTicketId" runat="server" 
                                            Text='<%# Eval("TicketId") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Movie">
                                <ItemTemplate>
                                    <asp:Label ID="lblMovieID" runat="server" 
                                            Text='<%# Movie(Eval("MovieID")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ChairID">
                                <ItemTemplate>
                                    <asp:Label ID="lblChairID" runat="server" 
                                            Text='<%# Eval("ChairID") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="DropDownList2" runat="server" 
                                        DataSourceID="LinqDataSource1" DataTextField="ChairID" DataValueField="ChairID" 
                                        Height="22px" Width="75px">
                                    </asp:DropDownList>
                                    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                                        ContextTypeName="DataClassesDataContext" EntityTypeName="" 
                                        Select="new (ChairID)" TableName="tblChairs">
                                    </asp:LinqDataSource>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Price">
                                <ItemTemplate>
                                    <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Height="22px" Width="70px"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="DateMovie">
                                <ItemTemplate>
                                    <asp:Label ID="lblDateMovie" runat="server" 
                                        Text='<%# Eval("DateMovie","{0:yyyy-MM-dd}") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Height="22px" Width="80px"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="TimeMovie">
                                <ItemTemplate>
                                    <asp:Label ID="lblTimeMovie" runat="server" Text='<%# Eval("TimeMovie") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox5" runat="server" Height="22px" Width="76px"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Status">
                                <EditItemTemplate>
                                    <asp:DropDownList ID="DropDownList1" runat="server" Height="22px" Width="72px">
                                        <asp:ListItem Value="0">No sale</asp:ListItem>
                                        <asp:ListItem Value="1">Sold</asp:ListItem>
                                    </asp:DropDownList>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblStatus" runat="server" Text='<%# Status(Eval("StatusT")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Notes">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblNotes0" runat="server" Text='<%# Eval("Notes") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowEditButton="True" />
                        </Columns>
                        <HeaderStyle CssClass="header" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td style="height: 12px">
                        </td>
            </tr>
            <tr>
                <td style="height: 12px">
                        &nbsp;</td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

